package org.acghub.mtdb.core.engine;

import com.alibaba.fastjson2.JSONObject;
import org.acghub.mtdb.common.Config;
import org.acghub.mtdb.common.Table;
import org.acghub.mtdb.common.exception.LifecycleException;
import org.acghub.mtdb.core.StorageEngine;
import org.acghub.mtdb.core.StorageEngineType;

/**
 * @author zhouhe
 */
public class JsonMySQLStorageEngine implements StorageEngine<JSONObject, JSONObject> {


    public static final StorageEngine INSTANCE = new JsonMySQLStorageEngine();

    @Override
    public void init(Config config) throws LifecycleException {

    }

    @Override
    public void close() throws LifecycleException {

    }

    @Override
    public boolean exists(Table table, JSONObject key) {
        return false;
    }

    @Override
    public JSONObject select(Table table, JSONObject key) {
        return null;
    }

    @Override
    public boolean insert(Table table, JSONObject key, JSONObject value) {
        return false;
    }

    @Override
    public boolean update(Table table, JSONObject key, JSONObject value) {
        return false;
    }

    @Override
    public void upsert(Table table, JSONObject key, JSONObject value) {

    }

    @Override
    public void delete(Table table, JSONObject key) {

    }

    @Override
    public void truncate(Table table) {

    }

    @Override
    public long count(Table table) {
        return 0;
    }

    @Override
    public StorageEngineType type() {
        return StorageEngineType.JSON_MYSQL;
    }
}
